/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package javaapplication1;

import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.widgets.Canvas;

/**
 *
 * @author Oren
 */
public class RV2 extends RV1{
String localType2 = "RV2";
    public RV2()
{
    super.speedLimit=20;
    super.headingLimit=40;
}

    public void setType(String type)
    {
        
        localType2 = type.concat(" "+localType2);

    }
 public String getType()
 {

     return localType2;
 }
  public void paint(PaintEvent e){
	Canvas c=(Canvas)e.widget;	// get the canvas

        // make a general function ?
        int maxX = c.getSize().x;	// max size
	int maxY = c.getSize().y;
	int mx=maxX/2,my=maxY/2;	// mid point as (0,0)
	int myX = mx + super.getCurrentPosition().x;	// set the current position
	int myY = my - super.getCurrentPosition().y;	// set the current position


	super.paint(e);
	e.gc.drawString(getType(),myX+13, myY,true);

}

}
